<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>填写核对订单信息</title>
    <link rel="stylesheet" href="{__STATIC_PATH__}index/cart1/css/base.css" type="text/css">
    <link rel="stylesheet" href="{__STATIC_PATH__}index/cart1/css/global.css" type="text/css">
    <link rel="stylesheet" href="{__STATIC_PATH__}index/cart1/css/header.css" type="text/css">
    <link rel="stylesheet" href="{__STATIC_PATH__}index/cart1/css/fillin.css" type="text/css">
    <link rel="stylesheet" href="{__STATIC_PATH__}index/cart1/css/footer.css" type="text/css">

    <script type="text/javascript" src="{__STATIC_PATH__}index/js/jquery.min.js"></script>
    <script type="text/javascript" src="{__STATIC_PATH__}index/cart1/js/cart2.js"></script>

</head>
<body>
<!-- 顶部导航 start -->
<div class="topnav">
    <div class="topnav_bd w990 bc">
        <div class="topnav_left">

        </div>
        <div class="topnav_right fr">
            <ul>
                <li>
                <li class="line">|</li>
                <li></li>
                <li class="line">|</li>
                <li></li>

            </ul>
        </div>
    </div>
</div>
<!-- 顶部导航 end -->

<div style="clear:both;"></div>

<!-- 页面头部 start -->
<div class="header w990 bc mt15">
    <div class="logo w990">
        <h2 class="fl"><a href="/"><img src="{__STATIC_PATH__}index/cart1/image/logo.png" alt="京西商城"></a></h2>
        <div class="flow fr flow2">
            <ul>
                <li>1.我的购物车</li>
                <li class="cur">2.填写核对订单信息</li>
                <li>3.成功提交订单</li>
            </ul>
        </div>
    </div>
</div>
<!-- 页面头部 end -->

<div style="clear:both;"></div>

<!-- 主体部分 start -->
<div class="fillin w990 bc mt15">
    <div class="fillin_hd">
        <h2>填写并核对订单信息</h2>
    </div>
<form action="" method="post">
    <div class="fillin_bd">
        <!-- 收货人信息  start-->
        <div class="address">
            <h3>收货人信息 <a href="javascript:;" id="address_modify"></a></h3>
            <div class="address_info">
                {volist name="address" id="v"}
                <p> <input type="radio" value="{$v.id}" name="address_id" {if condition="($v.is_default == 1)"} checked {else /} "" {/if}> {$v.name} {$v.tel} {$v.province} {$v.city} {$v.county} {$v.address}</p>
                {/volist}
            </div>

            <div class="address_select none">
                <ul>
                    <li class="cur">
                        <input type="radio" name="address"  /> 北京市 昌平区 建材城西路金燕龙办公楼一层 13555555555
                        <a href="">设为默认地址</a>
                        <a href="">编辑</a>
                        <a href="">删除</a>
                    </li>
                    <li>
                        <input type="radio" name="address"  />王超平 湖北省 武汉市  武昌 关山光谷软件园1号201 13333333333
                        <a href="">设为默认地址</a>
                        <a href="">编辑</a>
                        <a href="">删除</a>
                    </li>
                    <li><input type="radio" name="address" class="new_address"  />使用新地址</li>
                </ul>
            </div>
        </div>
        <!-- 收货人信息  end-->


        <!-- 支付方式  start-->
        <div class="pay">
            <h3>支付方式 <a href="javascript:;" id="pay_modify"></a></h3>
            <div class="pay_info">
                <div class="pay_select">
                    <table>
                        {foreach name="payType" item="v" key="k" }
                        <tr {if condition="($k == 0)"} class="cur" {else /} "" {/if}>
                            <td class="col1"><input type="radio" name="pay_id" {if condition="($k == 0)"} checked {else /} "" {/if} value="{$v.id}"> {$v.name}</td>
                            <td class="col2">{$v.info}</td>
                        </tr>
                        {/foreach}
                    </table>
                </div>
            </div>
        </div>
        <!-- 支付方式  end-->

        <!-- 商品清单 start -->
        <div class="goods">
            <h3>商品清单</h3>
            <table>
                <thead>
                <tr>
                    <th class="col1">商品</th>
                    <th class="col3">价格</th>
                    <th class="col4">数量</th>
                    <th class="col5">小计</th>
                </tr>
                </thead>
                <tbody>
                {volist name="carts" id="v"}
                <tr>
                    <td class="col1"><img src="{__PUBLIC_PATH__}images/{$v.image}" alt=""><strong>{$v.title}</strong></td>
                    <td class="col3">￥{$v.price}</td>
                    <td class="col4">{$v.num}</td>
                    <td class="col5"><span>{$v.price * $v.discount / 10 * $v.num}</span></td>
                </tr>
                {/volist}
                </tbody>
                <tfoot>
                <tr>
                    <td colspan="5">
                        <ul>

                            <li>
                                <span>{$count}件商品，总商品金额：</span>
                                <em>￥<span id="goods_price">{$total_price}</span></em>
                            </li>
                            <li>
                                <span>应付总额：</span>
                                <em class="total_price">￥{$total_price}</em>
                            </li>
                        </ul>
                    </td>
                </tr>
                </tfoot>
            </table>
        </div>
        <!-- 商品清单 end -->

    </div>

    <div class="fillin_ft">
        <input type="submit" value="" style="
            float: right;
            display: inline;
            width: 135px;
            height: 36px;
            background: url({__STATIC_PATH__}index/cart1/image/order_btn.jpg) 0 0 no-repeat;
            vertical-align: middle;
            margin: 7px 10px 0;
        " />
        <p>应付总额：<strong class="total_price">{$total_price}</strong></p>

    </div>
</form>
</div>
<!-- 主体部分 end -->

<div style="clear:both;"></div>
<!-- 底部版权 start -->
{include file="public/foot"}
<!-- 底部版权 end -->
    <script type="text/javascript">
        $(function () {
           $("[name='delivery_id']").change(function () {
//              alert($(this).attr("data_price"));
//               计算运费
              var price=$(this).attr("data_price")-0;
              $("#deliver_price").text('￥'+price);
//              计算总价
               $(".total_price").text('￥'+($("#goods_price").text()-0+price)+'.00');
           });
            // $("input[type='button']").on("click",function (){
            //     var pay_id = $(".pay_select input").val();
            //     console.log(pay_id);return;
            //     $.post("/index/order/index",{},function (data){
            //
            //     },"json")
            // })
        });
    </script>
</body>
</html>
